package howl.types.query;

import howl.types.Unit;

public class item {
	private String name;

	private Unit unit;

	private Double value;

	public item(String name, Unit unit, Double value) {
		super();
		this.name = name;
		this.unit = unit;
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Unit getUnit() {
		return unit;
	}

	public void setUnit(Unit unit) {
		this.unit = unit;
	}

	public Double getValue() {
		return value;
	}

	public void setValue(Double value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return "item [name=" + name + ", unit=" + unit + ", value=" + value
				+ "]";
	}

	public String toXML() {
		return "<Item><Name>" + this.getName() + "</Name>" + "<Value>"
				+ this.getValue() + "</Value>" + "<Unit>" + this.getUnit()
				+ "</Unit></Item>";
	}

}